#ifndef _SIZES_AND_LIMITS_H_
#define _SIZES_AND_LIMITS_H_

/** @addtogroup math_operations
@{ */

/** Maximum value of a signed 32-bit integer.
*/
#define MAX_32 INT_MAX

/** Maximum value of an unsigned 32-bit integer.
*/
#define UMAX_32 UINT_MAX

/** Minimum value of a signed 32-bit integer.
*/
#define MIN_32 INT_MIN

/** Half of the maximum value of a signed 32-bit integer.
*/
#define LONGWORD_HALF (MAX_32>>1)

/** Half of the minimum value of a signed 32-bit integer.
*/
#define LONGWORD_HALF_MIN (MIN_32>>1)

/** Bitmask for the sign bit in a signed 32-bit integer.
*/
#define LONGWORD_SIGN  MIN_32       /* sign bit */

/** Minimum value of a signed 32-bit integer.
*/
#define LONGWORD_MIN  MIN_32

/** Maximum value of a signed 32-bit integer.
*/
#define LONGWORD_MAX  MAX_32

/** Maximum value of a signed 16-bit integer.
*/
#define MAX_16 SHRT_MAX

/** Maximum value of an unsigned 16-bit integer.
*/
#define UMAX_16 USHRT_MAX 

/** Minimum value of a signed 16-bit integer.
*/
#define MIN_16 SHRT_MIN 

/** Half of the maximum value of a signed 16-bit integer.
*/
#define SHORTWORD_HALF (MAX_16>>1)

/** Bitmask for the sign bit in a signed 16-bit integer.
*/
#define SHORTWORD_SIGN  MIN_16          /* sign bit for Word16 type */

/** Minimum value of a signed 16-bit integer.
*/
#define SHORTWORD_MIN  MIN_16           /* smallest Ram */

/** Maximum value of a signed 16-bit integer.
*/
#define SHORTWORD_MAX  MAX_16           /* largest Ram */

#endif /* _SIZES_AND_LIMITS_H_ */